<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 1997, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<!DOCTYPE html
        PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
<h:head>
    <title>Ajax Defaults Request Page</title>
</h:head>
<h:body>
    <h:outputScript library="javax.faces" name="jsf.js" target="head"/>
    <h1>Test defaults without Prepended Ids</h1>
    <h:form id="form1" prependId="false">
        <h:panelGroup layout="block" id="outPanel">
        <h:outputText id="out1" value="#{ajaxrequest.echo}"/>
        <br/>
        <h:outputText id="echo1Out" value="#{ajaxrequest.echo1}"/>
        <br/>
        <h:outputText id="echo2Out" value="#{ajaxrequest.echo2}"/>
        <br/>
        <h:outputText id="echo3Out" value="#{ajaxrequest.echo3}"/>
        <br/>
        <h:outputText id="echo4Out" value="#{ajaxrequest.echo4}"/>
        <br/>
        </h:panelGroup>
        <h:commandButton id="refresh" value="refresh">
            <f:ajax render="outPanel"/>
            </h:commandButton>
        Explicit parameters:
        <h:inputText id="edit1" value="#{ajaxrequest.echo1}" valueChangeListener="#{ajaxrequest.echoValue}" >
            <f:ajax execute="edit1" render="edit1" />
            </h:inputText>
        <br/>
        Implicit execute:
        <h:inputText id="edit2" value="#{ajaxrequest.echo2}" valueChangeListener="#{ajaxrequest.echoValue}" >
            <f:ajax render="edit2" />
        </h:inputText>
        <br/>
        Implicit render:
        <h:inputText id="edit3" value="#{ajaxrequest.echo3}" valueChangeListener="#{ajaxrequest.echoValue}" >
            <f:ajax execute="edit3"/>
            </h:inputText>
        <br/>
        Default Options:
        <h:inputText id="edit4" value="#{ajaxrequest.echo4}" valueChangeListener="#{ajaxrequest.echoValue}" >
            <f:ajax/>
            </h:inputText>
        <br/>
        <!-- Contained within the form - but still shouldn't update except for full page load -->
        <h:outputText id="out2" value="#{ajaxrequest.echo}"/>
        <br/>
        <!-- Used to reset the values between tests -->
        <h:commandButton id="reset" value="reset" actionListener="#{ajaxrequest.resetEcho}"/>
        <br/>
        <h:commandButton id="reload" value="reload" />
    </h:form>
    <!-- Contained outside the form - shouldn't update except for full page load -->
    <h:outputText id="out3" value="#{ajaxrequest.echo}"/>

</h:body>
</html>
